import zmq  
   

'''
	this script is a simple demo of zmq client .
	you can do something user it
'''


def startDecode():
	context = zmq.Context()  
	socket = context.socket(zmq.SUB)  
	socket.connect("tcp://127.0.0.1:5000")  
	socket.setsockopt(zmq.SUBSCRIBE, "data")  
	while True:  
		print  socket.recv()
		
startDecode()
